/**
 * 维保方案管理
 */
import request from '@/utils/request'
import { kfApiUrl } from '../config'


/**
 * @description 分页查询
 * @param {type} data
 */
 export function getPageCustomerSupplierBrand(data) {
  return request({
    url: `${kfApiUrl}/customerSupplierBrand/getPageCustomerSupplierBrand`,
    method: 'post',
    data
  })
}
export function querySupplierIdList(params) {
  return request({
    url: `${kfApiUrl}/customerSupplierBrand/querySupplierIdList`,
    method: 'get',
    params
  })
}
export function invitationAppraise(data) {
  return request({
    url: `${kfApiUrl}/customerSupplierBrand/invitationAppraise`,
    method: 'post',
    data
  })
}
export function insertSelectiveSupplierBrand(data) {
  return request({
    url: `${kfApiUrl}/customerSupplierBrand/insertSelective`,
    method: 'post',
    data
  })
}
export function updateSelectiveSupplierBrand(data) {
  return request({
    url: `${kfApiUrl}/customerSupplierBrand/updateByPrimaryKeySelective`,
    method: 'post',
    data
  })
}
export function getProjectInfo(params) {
  return request({
    url: `${kfApiUrl}/customerComplaint/getProjectInfo/${params}`,
    method: 'get'
  })
}
export function getOwnerInfoList(params) {
  return request({
    url: `${kfApiUrl}/customerComplaint/getOwnerInfoList/${params}`,
    method: 'get'
  })
}
export function getPageCustomerSupplierInfo(data) {
  return request({
    url: `${kfApiUrl}/customerSupplierBrand/getPageCustomerSupplierInfo`,
    method: 'post',
    data
  })
}
export function updateInfoByPrimaryKeySelective(data) {
  return request({
    url: `${kfApiUrl}/customerSupplierBrand/updateInfoByPrimaryKeySelective`,
    method: 'post',
    data
  })
}

export function insertInfo(data) {
  return request({
    url: `${kfApiUrl}/customerSupplierBrand/insertInfo`,
    method: 'post',
    data
  })
}
export function deleteInFoByPrimaryKey(data) {
  return request({
    url: `${kfApiUrl}/customerSupplierBrand/deleteInFoByPrimaryKey?id=${data}`,
    method: 'post',
    
  })
}
export function querySupplierList(data) {
  return request({
    url: `${kfApiUrl}/customerSupplierBrand/querySupplierList`,
    method: 'post',
    data
  })
}
export function getCustomerSupplierBrandById(params) {
  return request({
    url: `${kfApiUrl}/customerSupplierBrand/getCustomerSupplierBrandById`,
    method: 'get',
    params
  })
}



/**
 * @description 分页查询
 * @param {type} data
 */
export function getSurveyList(data) {
  return request({
    url: `${kfApiUrl}/customerSatisfactionSurvey/getPageCustomerSatisfactionSurvey`,
    method: 'post',
    data
  })
}
/**
 * @description 分页查询
 * @param {type} data
 */
export function getCustomerSatisfactionSurveyById(params) {
  return request({
    url: `${kfApiUrl}/customerSatisfactionSurvey/getCustomerSatisfactionSurveyById`,
    method: 'get',
    params
  })
}
/**
 * @description 分页查询
 * @param {type} data
 */
export function queryProportionList(data) {
  return request({
    url: `${kfApiUrl}/customerSatisfactionSurvey/queryProportionList`,
    method: 'post',
    data
  })
}
/**
 * @description 分页查询
 * @param {type} data
 */
export function comfirmSurvey(data) {
  return request({
    url: `${kfApiUrl}/customerSatisfactionSurvey/comfirm?id=${data}`,
    method: 'post'
  })
}
/**
 * @description 分页查询
 * @param {type} data
 */
export function getTotalScore(data) {
  return request({
    url: `${kfApiUrl}/customerSatisfactionSurvey/getTotalScore`,
    method: 'post',
    data
  })
}
/**
 * @description 分页查询
 * @param {type} data
 */
export function updateByPrimaryKeySelective(data) {
  return request({
    url: `${kfApiUrl}/customerSatisfactionSurvey/updateByPrimaryKeySelective`,
    method: 'post',
    data
  })
}
/**
 * @description 分页查询
 * @param {type} data
 */
export function queryOwnerInfo(data) {
  return request({
    url: `${kfApiUrl}/customerSatisfactionSurvey/queryOwnerInfo?projectId=${data.projectId}`,
    method: 'post',
    
  })
}
/**
 * @description 根据项目id查询绑定的业主
 * @param {type} data
 */
 export function queryBindingOwner(data) {
  return request({
    url: `${kfApiUrl}/customerSatisfactionSurvey/queryBindingOwner?projectId=${data.projectId}`,
    method: 'post',
  })
}
/**
 * @description 分页查询
 * @param {type} data
 */
export function bindingOwner(data) {
  return request({
    url: `${kfApiUrl}/customerSatisfactionSurvey/bindingOwner`,
    method: 'post',
    data
  })
}
/**
 * @description 分页查询
 * @param {type} data
 */
 export function getPageCustomerPraise(data) {
  return request({
    url: `${kfApiUrl}/customerPraise/getPageCustomerPraise`,
    method: 'post',
    data
  })
}
/**
 * @description 分页查询
 * @param {type} data
 */
 export function deleteByPrimaryKey(data) {
  return request({
    url: `${kfApiUrl}/customerPraise/deleteByPrimaryKey?id=${data}`,
    method: 'post',
    
  })
}
/**
 * @description 分页查询
 * @param {type} data
 */
 export function insertSelectivePraise(data) {
  return request({
    url: `${kfApiUrl}/customerPraise/insertSelective`,
    method: 'post',
    data
  })
}
/**
 * @description 分页查询
 * @param {type} data
 */
 export function updateByPrimaryPraise(data) {
  return request({
    url: `${kfApiUrl}/customerPraise/updateByPrimaryKeySelective`,
    method: 'post',
    data
  })
}
/**
 * @description 分页查询
 * @param {type} data
 */
 export function getCustomerPraiseById(params) {
  return request({
    url: `${kfApiUrl}/customerPraise/getCustomerPraiseById`,
    method: 'get',
    params
  })
}

/**
 * @description 批量推送满意度调查
 * @param {type} data
 */
 export function batchPushSurvey(data) {
  return request({
    url: `${kfApiUrl}/customerSatisfactionSurvey/batchPushSurvey`,
    method: 'post',
    data: data
  })
}
